package com.k7.mobile.platform.dao.impl;

import java.util.List;

import com.k7.mobile.platform.dao.ISearchDAO;
import com.k7.mobile.platform.dataobject.SearchDO;


public class SearchDAOImpl extends BaseDAOImpl implements ISearchDAO{

	@Override
	public Long add(SearchDO searchDO) {
		
		Object id = getSqlMapClientTemplate().insert("SEARCH-ADD", searchDO);
		return (Long) id;
	}
	
	@Override
	public void delete(SearchDO searchDO) {
		
		this.getSqlMapClientTemplate().delete("SEARCH-DEL", searchDO);
		
	}

	@Override
	public void update(SearchDO searchDO) {
		
		this.getSqlMapClientTemplate().update("SEARCH-UPDATE", searchDO);
		
	}

	@Override
	public List<SearchDO> findList(SearchDO searchDO) {
		
		return this.executeQueryForList("FIND-SEARCH-LIST","FIND-SEARCH-LIST-COUNT",  searchDO);
	}

	@Override
	public SearchDO getSearch(SearchDO searchDO) {
		return (SearchDO) this.getSqlMapClientTemplate().queryForObject("GET-SEARCH", searchDO);
	}


}
